﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing {
    import org.aswing.geom.*;

    public class FrameTitleBarLayout extends BorderLayout {

        protected var minSize:IntDimension;

        public function FrameTitleBarLayout(_arg1:int=50, _arg2:int=20){
            this.minSize = new IntDimension(_arg1, _arg2);
        }
        protected function countMinSize(_arg1:Container):void{
            var _local2:FrameTitleBar = FrameTitleBar(_arg1);
            this.minSize.height = _local2.getMinimizeHeight();
        }
        override public function minimumLayoutSize(_arg1:Container):IntDimension{
            this.countMinSize(_arg1);
            return (this.preferredLayoutSize(_arg1));
        }
        override public function preferredLayoutSize(_arg1:Container):IntDimension{
            this.countMinSize(_arg1);
            var _local2:IntDimension = super.preferredLayoutSize(_arg1);
            var _local3:FrameTitleBar = FrameTitleBar(_arg1);
            var _local4:JLabel = _local3.getLabel();
            if (((_local4) && (_local4.isVisible()))){
                _local2.width = (_local2.width - Math.max(0, (_local4.getPreferredWidth() - 60)));
            };
            _local2.width = Math.max(this.minSize.width, _local2.width);
            _local2.height = Math.max(this.minSize.height, _local2.height);
            return (_local2);
        }

    }
}//package org.aswing 
